using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class UpdateManager : MonoBehaviour
{
    enum UpdateStage
    {
        CheckDownloadIndex, //下载并检查索引文件，生成下载列表
        Downloading,        //下载需要更新的资源包
        LoadLuaScript,
    }
    public delegate void ProcessCompleteEvent();

    private UpdateStage mStage = UpdateStage.CheckDownloadIndex;
    private string mHttpAddress;
    private static UpdateManager mSingleton;
    private List<BundleItem> mDownloadingList = new List<BundleItem>();
    private int mTotalDownloadBytes = 0;
    private int mCurrentDownloadIdx = 0;
    private int mAlreadyDownloadBytes = 0;
    private WWW mWWW = null;
    private string mNewIndexContent;
    private Dictionary<string, byte[]> mLuaTables = new Dictionary<string, byte[]>();
    private ProcessCompleteEvent mAllDoneEvent;
    // Start is called before the first frame update
    void Start()
    {

    }

    // Update is called once per frame
    void Update()
    {

    }
}
